-
-
Notifications
You must be signed in to change notification settings - Fork 372
Structured Logs: Add SentrySwiftLog Integration
#6286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6286 +/- ##
=============================================
+ Coverage 85.169% 85.186% +0.016%
=============================================
Files 452 453 +1
Lines 27659 27704 +45
Branches 12117 12119 +2
=============================================
+ Hits 23557 23600 +43
- Misses 4054 4059 +5
+ Partials 48 45 -3
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4a7a005 | 1229.15 ms | 1243.35 ms | 14.20 ms |
| ae7be93 | 1236.24 ms | 1258.18 ms | 21.94 ms |
| b9ceffb | 1222.57 ms | 1247.96 ms | 25.39 ms |
| 884b224 | 1221.11 ms | 1255.88 ms | 34.77 ms |
| 2a9a505 | 1221.49 ms | 1238.49 ms | 17.00 ms |
| 00d9740 | 1223.53 ms | 1249.75 ms | 26.22 ms |
| e8f9a1d | 1229.02 ms | 1264.17 ms | 35.15 ms |
| 6502818 | 1229.08 ms | 1245.46 ms | 16.37 ms |
| 5712478 | 1220.10 ms | 1239.69 ms | 19.59 ms |
| 8da82b4 | 1220.08 ms | 1248.24 ms | 28.16 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4a7a005 | 23.75 KiB | 979.96 KiB | 956.22 KiB |
| ae7be93 | 23.75 KiB | 879.24 KiB | 855.49 KiB |
| b9ceffb | 23.75 KiB | 969.07 KiB | 945.32 KiB |
| 884b224 | 23.75 KiB | 879.55 KiB | 855.80 KiB |
| 2a9a505 | 23.75 KiB | 874.46 KiB | 850.71 KiB |
| 00d9740 | 23.75 KiB | 938.32 KiB | 914.57 KiB |
| e8f9a1d | 23.75 KiB | 969.78 KiB | 946.04 KiB |
| 6502818 | 23.75 KiB | 959.45 KiB | 935.70 KiB |
| 5712478 | 23.75 KiB | 969.28 KiB | 945.54 KiB |
| 8da82b4 | 23.75 KiB | 913.63 KiB | 889.88 KiB |
Previous results on branch: denrase/swift-log-sentry-poc
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f23a1b4 | 1226.17 ms | 1264.55 ms | 38.38 ms |
| 94f5fa8 | 1222.72 ms | 1254.48 ms | 31.75 ms |
| 0fd08ab | 1225.14 ms | 1256.49 ms | 31.35 ms |
| b52b178 | 1227.86 ms | 1255.65 ms | 27.79 ms |
| 2bd1339 | 1223.22 ms | 1248.85 ms | 25.64 ms |
| 74acaca | 1209.85 ms | 1247.02 ms | 37.17 ms |
| 47c3aeb | 1221.08 ms | 1259.42 ms | 38.34 ms |
| 6245148 | 1229.77 ms | 1269.93 ms | 40.17 ms |
| 53379e0 | 1231.19 ms | 1269.38 ms | 38.20 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f23a1b4 | 23.75 KiB | 1.01 MiB | 1016.14 KiB |
| 94f5fa8 | 23.75 KiB | 1023.29 KiB | 999.54 KiB |
| 0fd08ab | 23.75 KiB | 995.43 KiB | 971.68 KiB |
| b52b178 | 23.75 KiB | 989.97 KiB | 966.22 KiB |
| 2bd1339 | 23.75 KiB | 1.01 MiB | 1006.48 KiB |
| 74acaca | 23.75 KiB | 1023.82 KiB | 1000.07 KiB |
| 47c3aeb | 23.75 KiB | 1023.84 KiB | 1000.09 KiB |
| 6245148 | 23.75 KiB | 1023.82 KiB | 1000.07 KiB |
| 53379e0 | 23.75 KiB | 1.00 MiB | 1002.40 KiB |
# Conflicts: # Package.swift # Sentry.xcodeproj/project.pbxproj
swift-log IntegrationSentrySwiftLog Integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@itaybre @philprime Thank you both for your feedback. I will merge once CI is happy (excluding timeouts) and then rebase the other draft PRs for the other integrations, using the same setup we have here. 🙇♂️ |
📜 Description
The Sentry
swift-logintegration.Setup
SentrySwiftLogas a target toSentrytargetSentrySwiftLogtoPackage.swiftiOS15-SwiftUiapp so you can play around with itImplementation
SentryLogHandlersentry-logmetadata is mapped to attributes and prefixed withswift-logDiscussion
Here vs Own Repo
Added the integration to this repo, because it is easier for us to maintain.
On the
swift-logrepo integrations section is linking to the swift package index with search termswift-log. So for visibility, we'd need to have a separateswift-log-sentryrepo.https://github.com/apple/swift-log?tab=readme-ov-file#available-log-handler-backends
https://swiftpackageindex.com/search?query=swift-log
Distribution
Only distributed through SPM, as
swift-logdropped support for CocoaPods. Also, we'll not be able to distribute this as a binary, asswift-logis not supporting that.💡 Motivation and Context
Closes #5372
💚 How did you test it?
Unit Tests
Sample App
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.